#ifndef RENDERCONTEXT_H
#define RENDERCONTEXT_H

#include "mathengine.h"

namespace raster {

class RenderContext {
public:
    RenderContext() = default;

    void setModel(const mathengine::Matrix44f& m);
    void lookAt(const mathengine::Vec3f& eye, const mathengine::Vec3f& center, const mathengine::Vec3f& up);
    void projection(float coeff);
    void projection(float fov, float aspect, float near, float far);
    void viewport(int x, int y, int w, int h, int depth = default_depth);

    mathengine::Matrix44f getModel() const;
    mathengine::Matrix44f getView() const;
    mathengine::Matrix44f getProjection() const;
    mathengine::Matrix44f getViewport() const;
    mathengine::Matrix44f getMVP() const;

    static constexpr int default_depth = 255;
protected:
    mathengine::Matrix44f model_;
    mathengine::Matrix44f view_;
    mathengine::Matrix44f projection_;
    mathengine::Matrix44f viewport_;
};

}

#endif // RENDERCONTEXT_H
